We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

request->hasFiles() always return 1(true) in phalcon 2.0.2 and 2.0.1

hi, I install the version 2.0.2 on my local xampp and ofter run my project on upload file in request->hasFiles() line if i brows file or not it's always return true(1)... i come back to version 1.3.3 but it is OK and when i un select a file it return flase(0)...

edited Jun '15

I have this same problem I write the post on tuesday https://forum.phalcon.io/discussion/6966/problem-with-uploading-files if i submit the form without any files and i check $this->request->hasFiles() i have true but my $_FILES array is [name] =>
[type] => [tmp_name] => [error] => 4 [size] => 0 UPLOAD_ERR_NO_FILE Value: 4; No file was uploaded. I think there is the problem https://github.com/phalcon/cphalcon/blob/master/phalcon/http/request.zep#L605